package sv.gob.mh.dgii.model;

// Generated Dec 12, 2007 1:25:05 PM by Hibernate Tools 3.2.0.CR1

import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * DfObligGenera generated by hbm2java
 */
@Entity
@Table(name = "DF_OBLIG_GENERA", schema = "DICTAMEN")
public class DfObligGenera implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4853167574724903670L;
	private Long igeneracion;
	private String cusuario;
	private Date fhinicio;
	private Date fhfin;
	
	private Set<DfObligado> dfObligados = new HashSet<DfObligado>(0);

	public DfObligGenera() {
	}

	public DfObligGenera(Long igeneracion, String cusuario, Date fhinicio,
			Date fhfin) {
		this.igeneracion = igeneracion;
		this.cusuario = cusuario;
		this.fhinicio = fhinicio;
		this.fhfin = fhfin;
	}

 

	@Id
	@Column(name = "I_GENERACION", unique = true, nullable = false, precision = 10, scale = 0)
	public Long getIgeneracion() {
		return this.igeneracion;
	}

	public void setIgeneracion(Long igeneracion) {
		this.igeneracion = igeneracion;
	}

	@Column(name = "C_USUARIO", nullable = false, length = 30)
	public String getCusuario() {
		return this.cusuario;
	}

	public void setCusuario(String cusuario) {
		this.cusuario = cusuario;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FH_INICIO", nullable = false, length = 7)
	public Date getFhinicio() {
		return this.fhinicio;
	}

	public void setFhinicio(Date fhinicio) {
		this.fhinicio = fhinicio;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "FH_FIN", nullable = false, length = 7)
	public Date getFhfin() {
		return this.fhfin;
	}

	public void setFhfin(Date fhfin) {
		this.fhfin = fhfin;
	}

	 

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "dfObligGenera")
	public Set<DfObligado> getDfObligados() {
		return this.dfObligados;
	}

	public void setDfObligados(Set<DfObligado> dfObligados) {
		this.dfObligados = dfObligados;
	}

}
